#ifndef REPLACEDLG_H
#define REPLACEDLG_H

#include <wx/notebook.h>

#include "findreplacebase.h"

class wxComboBox;
class wxCommandEvent;

class FindReplaceDlg : public FindReplaceBase {
  public:
    FindReplaceDlg( wxWindow* parent, const wxString& initial = wxEmptyString, bool hasSelection = false,
                    bool findMode = true, bool findReplaceInFilesOnly = false, bool findReplaceInFilesActive = false );
    ~FindReplaceDlg();
    wxString GetFindString() const;
    wxString GetReplaceString() const;
    bool IsFindInFiles() const;
    bool GetDeleteOldSearches() const;
    bool GetSortSearchResult() const;
    bool GetMatchWord() const;
    bool GetStartWord() const;
    bool GetMatchCase() const;
    bool GetRegEx() const;
    bool GetAutoWrapSearch() const;
    bool GetFindUsesSelectedText() const;
    bool GetStartFile() const;
    bool GetMultiLine() const;
    bool GetFixEOLs() const;
    int GetDirection() const;
    int GetOrigin() const;
    int GetScope() const;
    bool GetRecursive() const;
    bool GetHidden() const;
    wxString GetSearchPath() const;
    wxString GetSearchMask() const;
    int GetProject() const;
    int GetTarget() const;
    bool IsMultiLine() const;
  protected:
    void OnReplaceChange( wxNotebookEvent& event );
    void OnRegEx( wxCommandEvent& event );
    void OnActivate( wxActivateEvent& event );
    void OnMultiChange( wxCommandEvent& event );
    void OnLimitToChange( wxCommandEvent& event );
    void OnScopeChange( wxCommandEvent& event );
    void OnBrowsePath( wxCommandEvent& event );
    void OnSearchProject( wxCommandEvent& event );
    void OnDeferredFocus( wxCommandEvent& event );
  private:
    void FillComboWithLastValues( wxComboBox* combo, const wxString& configKey );
    void SaveComboValues( wxComboBox* combo, const wxString& configKey );
    bool m_findReplaceInFilesActive;
    bool m_findMode;
    bool xml_File_lock;
    wxWindow *m_findPage;
    DECLARE_EVENT_TABLE()
};

#endif
